﻿<!--#include file="../../mae/mae.asp"-->
<%
res.Charset = "utf-8"

dim conf:set conf = KeyValue()
conf "DB_Type", "ACCESS"
conf "DB_Path", "./Data/GBqcBsFizy.mdb"
define "MO_DATABASE_DB", conf.valueOf()
define "MO_TEMPLATE_ENGINE", "views/view2.js"

'初始化，这里MO_COMPILE_CACHE设置为false了，为了调试方便
Mo.Start "../../mae/Mo", "MO_ERROR_REPORTING", E_ERROR or E_LOG or E_WARNING or E_LOG, "MO_COMPILE_CACHE", false

Mo.Method = "Home"
Mo.Action = "Index"
Mo.assign "name", "anlige"
Mo.assign "list", JSArray(1,2,3,4,5,6,7).valueOf()
Mo.assign "db", Model__("Public", "id").iwhere("id>?", 3).limit(1,10).query().fetch()

'因为VBS的局限，我只能用JSON创建个JScript的数据表了
dim json2 : set json2 = JSON.create(1)
json2.putObject().put("name", "anlige").put("age", 28).putArray("score").put(89).put(99)
json2.putObject().put("name", "lilith").put("age", 24).putArray("score").put(86).put(98)

Mo.assign "stus", json2.data


Mo.display "Index"

'必要的清理
Mo.End()
%>